#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int i = 0;
	int j = 0;
	int n = 0;
	char a = 'Z';
	scanf("%d", &n);
	for (i = 0; i < n; i++)
	{
		for (j = i + 1; j < n; j++)
		{
			printf(" ");
		}
		printf("%2c", a);
		if (a != 'Z')
		{
			for (j = 2 * (n - i) + 1; j < 2 * n; j++)
			{
				printf(" ");
			}
			a = a - 1;
			printf("%2c", a);
		}
		a = a - 1;
		printf("\n");
	}
	a = a + 1;
		for (i = n - 1; i > 0; i--)
		{
			for (j = n - i; j > 0; j--)
			{
				printf(" ");
			}
			printf("%2c",a);
			a = a - 1;
			for (j = 2 * (i - 1) - 1; j > 0; j--)
			{
				printf(" ");
			}
			if (i != 1)
			{
				printf("%2c", a);
				a = a - 1;
			}
			printf("\n");
		}
	return 0;
}